package singleton;

/**
 * 懒汉式，线程不安全
 *
 * @author 若雨成霜
 */
public class SingletonType1 {

    private static SingletonType1 instance1;

    private SingletonType1() {
    }

    public static SingletonType1 getInstance() {
        if (instance1 == null) {
            instance1 = new SingletonType1();
        }
        return instance1;
    }
}
